package com.atxiaodei.alibabaseata.service.impl;

import com.atxiaodei.alibabaseata.dao.AccountDao;
import com.atxiaodei.alibabaseata.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * @ClassName AccountServiceImpl
 * @Deacription TODO
 * @Author 王盟
 * @Date 2021/3/1 10:34
 * @Version 1.0
 **/
@Slf4j
@Service
public class AccountServiceImpl implements AccountService {


    @Resource
    private AccountDao accountDao;

    @Override
    public void decrease(Long userId, BigDecimal money) {
        log.info("----> account-service中扣减用户余额开始");
        accountDao.decrease(userId,money);
        log.info("----> account-service中扣减用户余额开始");
    }
}
